package org.wang.generalcode.modules.sys.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 部门表视图实体类
 *
 * @author wz
 * @since 2024-08-08
 */
@Data
@Schema(description = "部门表")
public class DeptVO {
	private static final long serialVersionUID = 1L;

	@Schema(description = "部门ID")
	private Long id;

	@Schema(description = "父部门ID")
	private Long parentId;

	@Schema(description = "部门名称")
	private String name;

	@Schema(description = "部门编号")
	private String code;

	@Schema(description = "排序")
	private Integer sort;

	@Schema(description = "状态(1:启用；0:禁用)")
	private Integer status;

	@Schema(description = "子部门")
	private List<DeptVO> children;

	@Schema(description = "创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	private LocalDateTime createTime;
	@Schema(description = "修改时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	private LocalDateTime updateTime;

}
